package com.mjx.algorithm.oj;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

/**
 * 折线平面：result=n*(2*n-1)+1
 * Created by 梅京翔 on 2017 02 08下午 8:03.
 */
public class problem1039 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int num = scanner.nextInt();
        List<Integer> list = new ArrayList<Integer>();
        for (int i = 0; i < num; i++)
            list.add(scanner.nextInt());
        for (int i = 0; i < num; i++) {
            int number = list.get(i);
            System.out.println(number * getIndexOdd(number) + 1);
        }
    }

    /**
     * 获得指定的奇数
     */
    public static int getIndexOdd(int n){
        return 2 * n - 1;
    }
}
